#include "Elephant.h"
#include <iostream>
using namespace std; 
void Elephant::enterFridge(Refrigerator& fridge) { 
    if (fridge.getDoorStatus()) {
        if (!isInFridge) {
            isInFridge = true;
            cout << "大象成功进入冰箱" << endl;
        } else {
            cout << "大象已在冰箱内，无需重复放入" << endl;
        }
    } else {
        cout << "冰箱门未打开，大象无法进入" << endl;
    }
} 
bool Elephant::getInFridgeStatus() const {
    return isInFridge;
}
